.cyber-theme {
    --primary: #0a0a12;
    --secondary: #1a1a2e;
    --accent: #00d9ff;
    --accent-alt: #ff0080;
    --text: #e0e0ff;
    --text-secondary: #a0a0c0;
    --panel: rgba(20, 20, 40, 0.95);
    --border: rgba(0, 217, 255, 0.2);
    --shadow: rgba(0, 217, 255, 0.1);
    --success: #00ff9d;
    --warning: #ffaa00;
}

body {
    margin: 0;
    padding: 0;
    background: var(--primary);
    color: var(--text);
    font-family: 'Segoe UI', 'Arial', sans-serif;
    height: 100vh;
    overflow: hidden;
}

.cyber-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0, 217, 255, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 0, 128, 0.1) 0%, transparent 20%);
}

.cyber-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header-left .cyber-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent), var(--accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cyber-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.cyber-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.stat-item i {
    color: var(--accent);
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.shelf-panel {
    width: 350px;
    border-right: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 15px;
}

.search-box i {
    color: var(--accent);
    margin-right: 8px;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.cyber-btn {
    background: linear-gradient(145deg, rgba(0, 217, 255, 0.1), rgba(255, 0, 128, 0.1));
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cyber-btn:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.cyber-btn.small {
    padding: 6px 10px;
    font-size: 12px;
}

.cyber-btn.accent {
    background: linear-gradient(145deg, var(--accent), var(--accent-alt));
    color: var(--primary);
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.view-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.books-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.book-card {
    background: linear-gradient(145deg, rgba(20, 20, 40, 0.9), rgba(10, 10, 25, 0.9));
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.book-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow);
}

.book-card.active {
    border-color: var(--accent-alt);
    background: linear-gradient(145deg, rgba(40, 10, 40, 0.9), rgba(20, 20, 40, 0.9));
}

.book-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-alt));
}

.book-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.book-author {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.book-meta {
    font-size: 10px;
    color: var(--accent);
    display: flex;
    justify-content: space-between;
}

.reader-panel {
    flex: 1;
    display: none;
    flex-direction: column;
    background: var(--panel);
}

.reader-panel.active {
    display: flex;
}

.reader-header {
    padding: 15px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reader-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.book-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.sep {
    margin: 0 8px;
}

.reader-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.content-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.font-controls, .mode-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ctrl-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-label {
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.text-display {
    flex: 1;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 25px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.text-display.night-mode {
    background: #1a1a2e;
    color: #f0f0ff;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--accent);
    opacity: 0.5;
}

.reader-footer {
    margin-top: 20px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.nav-btn:hover {
    border-color: var(--accent);
}

.progress-info {
    flex: 1;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-alt));
    width: 0%;
    transition: width 0.3s;
}

.page-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-percent {
    color: var(--accent);
}

.side-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100%;
    background: var(--panel);
    border-left: 1px solid var(--border);
    transition: right 0.3s;
    z-index: 1000;
}

.side-panel.active {
    right: 0;
}

.side-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.side-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-panel {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
}

.side-content {
    padding: 15px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.setting-group input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    -webkit-appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch input {
    display: none;
}

.slider {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    position: relative;
    transition: all 0.3s;
}

.slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s;
}

.switch input:checked + .slider {
    background: var(--accent);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
    background: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--accent), var(--accent-alt));
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--accent-alt), var(--accent));
}

/* 移动端适配 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .shelf-panel {
        width: 100%;
        height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .reader-panel.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: var(--panel);
    }
    
    .cyber-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cyber-stats {
        width: 100%;
        justify-content: space-between;
    }
}